import React, { Component } from 'react'
import ThemeContext from './ThemeContext';

export default class VoteFooter extends Component {
    render() {
        return (
            <ThemeContext.Consumer>
                {context => {
                    let { change } = context
                    return <div className="footer">
                        <button onClick={change.bind(null, 'sup')}>支持</button>
                        <button onClick={change.bind(null, 'opp')}>反对</button>
                    </div>
                }}
            </ThemeContext.Consumer>
        )
    }
}
